feat(core): app menu waffle launcher#60180
Conversation
| </script> | ||
|
|
||
| <style scoped lang="scss"> | ||
| .app-item { |
There was a problem hiding this comment.
We can consider moving this to @nextcloud/vue in future, since this item will be used on dashboard, universal search, etc.
Would like to ship in-place for first iteration.
There was a problem hiding this comment.
if planned for nextcloud-vue it would be great to use css modules instead of scoped styles for two-way isolation of styles.
| // NcPopover's focus-trap only knows the slot trigger (waffle). | ||
| // The current-app button lives outside the slot, so we track the | ||
| // source and restore focus manually via setReturnFocus. | ||
| openedFrom: null as 'waffle' | 'currentApp' | null, |
There was a problem hiding this comment.
UX behaviour relevant question here. Used common sense for first iteration.
| return | ||
| } | ||
|
|
||
| const cols = 4 |
There was a problem hiding this comment.
magic number 😬 imo fine for first iteration, but some rework might be needed here.
| case ' ': { | ||
| // Space's default scrolls the nearest scrollable ancestor (the | ||
| // popover); intercept and click programmatically. Enter gets | ||
| // the same treatment so we can close the popover uniformly. |
There was a problem hiding this comment.
Consistent with other waffle menus I looked at, but worth flagging as UX question
There was a problem hiding this comment.
space seems a bit unexpected here rest seems fine (for accessibility)
There was a problem hiding this comment.
fwiw APG recommends this behaviour:
My reasoning is that arrows, Home and End all trigger focus events (which will auto-scroll), making it possible for users to scroll the list without needing a dedicated key for it.
| // which is dark on light themes. The header sits on the theme primary | ||
| // background, so override to use the matching plain-text color. | ||
| --color-main-text: var(--color-background-plain-text); | ||
| color: var(--color-background-plain-text); |
There was a problem hiding this comment.
Might be better to add variants to @nextcloud/vue, but imo fine for first iteration
| --app-item-row-height: 64px; | ||
| --app-menu-rows-visible: 6; | ||
| padding: calc(var(--default-grid-baseline) * 3) calc(var(--default-grid-baseline) * 2); | ||
| display: grid; |
There was a problem hiding this comment.
We can debate whether grid is best/simplest solution here. Happy to iterate on this.
| scrollbar-color: var(--color-scrollbar) transparent !important; | ||
|
|
||
| &::-webkit-scrollbar { | ||
| width: 6px !important; |
There was a problem hiding this comment.
Quick and dirty scrollbar styling. Happy to iterate on this.
| v-if="currentApp" | ||
| class="app-menu__current-app" | ||
| type="button" | ||
| :aria-label="t('core', 'Open apps menu')" |
There was a problem hiding this comment.
so both buttons open the waffle menu?
I would expect this button to open the index of the current app instead
There was a problem hiding this comment.
Yes as per design spec
This also feels like a weird interaction to me, especially since the popup anchor still points to the waffle. Would you mind expanding on what the rationale is here @kra-mo?
There was a problem hiding this comment.
agree UX wise this is unexpected
There was a problem hiding this comment.
This also feels like a weird interaction to me, especially since the popup anchor still points to the waffle. Would you mind expanding on what the rationale is here @kra-mo?
Since most apps that need it already provide a navigation item to go "Home", it was to make the menu more easy to access and discover.
I thought of both behaviors and this just felt "safer", even if more unconventional. Maybe I'm just being overly cautious though.
Were we to keep this, it would be good to link the two as a single button (when focused or hovered for example).
There was a problem hiding this comment.
Ok yeah that makes sense. I think a single button would definitely help yes. Perhaps we go with what we have for the first step and gather some internal feedback?
f177035 to
c115c2f
Compare
|
Approved to be merged for the screenshots, we will address all the raised concerns in a follow-up. |
|
Because truncated app names are a concern raised from users every now and than with the "old menu". Does this menu adjust the column width automatically so that the app name is always completely readable (also think about translation where app names might be longer)? |
528fedd to
459eb89
Compare
|
Ha, sorry, by should, I meant it does. It was a screenshot :) |
kra-mo
left a comment
There was a problem hiding this comment.
Looks generally good as a first iteration from the design side. But apps should open on the same page as previously mentioned (I'm not sure if that has been changed already, I can't test it besides the preview page).
Issues I saw on the demo:
The + icon seems to be missing?
When opening the menu from the app name button, it is left in this state after closing it:
And a small nit:
It would be good if the padding of the container was consistent all-around and instead, the top row had increased top padding. This way, the hover/focus effect would be concentric(-ish) with the outside container :)
kra-mo
left a comment
There was a problem hiding this comment.
Ah, and my previous comment about the colors in dark mode: #59888 (comment)
459eb89 to
2319472
Compare
- Popover grid replaces the old hamburger overlay - Roving tabindex keyboard nav (arrow keys, Home/End, Enter/Space) - Focus returns to whichever trigger opened the popover - RTL-aware horizontal alignment - Admin-only "More apps" tile - Unit + Cypress coverage Resolves: #59888 Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
-e Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
…cher Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
d2c9166 to
c36d64d
Compare
|
CI failure unrelated |





Summary
First pass at the waffle launcher behind the apps icon in the header. Opening it shows a 4-wide grid of installed apps in a popover; admins also see a "More apps" tile linking to the app store. The existing current-app button is kept as a second trigger for the same popover.
Preview link
What's in:
TODO
Follow-ups for later PRs:
Checklist
3. to review, feature component)stable32)